<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QPinchGesture Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QPinchGesture Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QPinchGesture class describes a pinch gesture made by the
user. <a href="#details">More...</a></p>

<p>Inherits <a href="qgesture.html">QGesture</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qpinchgesture.html#ChangeFlag-enum">ChangeFlag</a></b> { ScaleFactorChanged, RotationAngleChanged, CenterPointChanged }</li><li><div class="fn" />class <b><a href="qpinchgesture-changeflags.html">ChangeFlags</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qpinchgesture.html#QPinchGesture">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QPointF <b><a href="qpinchgesture.html#centerPoint">centerPoint</a></b> (<i>self</i>)</li><li><div class="fn" />ChangeFlags <b><a href="qpinchgesture.html#changeFlags">changeFlags</a></b> (<i>self</i>)</li><li><div class="fn" />QPointF <b><a href="qpinchgesture.html#lastCenterPoint">lastCenterPoint</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#lastRotationAngle">lastRotationAngle</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#lastScaleFactor">lastScaleFactor</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#rotationAngle">rotationAngle</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#scaleFactor">scaleFactor</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setCenterPoint">setCenterPoint</a></b> (<i>self</i>, QPointF&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setChangeFlags">setChangeFlags</a></b> (<i>self</i>, ChangeFlags&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setLastCenterPoint">setLastCenterPoint</a></b> (<i>self</i>, QPointF&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setLastRotationAngle">setLastRotationAngle</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setLastScaleFactor">setLastScaleFactor</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setRotationAngle">setRotationAngle</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setScaleFactor">setScaleFactor</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setStartCenterPoint">setStartCenterPoint</a></b> (<i>self</i>, QPointF&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setTotalChangeFlags">setTotalChangeFlags</a></b> (<i>self</i>, ChangeFlags&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setTotalRotationAngle">setTotalRotationAngle</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qpinchgesture.html#setTotalScaleFactor">setTotalScaleFactor</a></b> (<i>self</i>, float&#160;<i>value</i>)</li><li><div class="fn" />QPointF <b><a href="qpinchgesture.html#startCenterPoint">startCenterPoint</a></b> (<i>self</i>)</li><li><div class="fn" />ChangeFlags <b><a href="qpinchgesture.html#totalChangeFlags">totalChangeFlags</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#totalRotationAngle">totalRotationAngle</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qpinchgesture.html#totalScaleFactor">totalScaleFactor</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QPinchGesture class describes a pinch gesture made by the
user.</p>
<p>A pinch gesture is a form of touch user input in which the user
typically touches two points on the input device with a thumb and
finger, before moving them closer together or further apart to
change the scale factor, zoom, or level of detail of the user
interface.</p>
<p>For an overview of gesture handling in Qt and information on
using gestures in your applications, see the <a href="gestures-overview.html">Gestures Programming</a> document.</p>
<p class="centerAlign"><img src="images/pinchgesture.png" /></p>
<p>Instead of repeatedly applying the same pinching gesture, the
user may continue to touch the input device in one place, and apply
a second touch to a new point, continuing the gesture. When this
occurs, gesture events will continue to be delivered to the target
object, containing an instance of QPinchGesture in the <a href="qt.html#GestureState-enum">Qt.GestureUpdated</a> state.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ChangeFlag-enum" />QPinchGesture.ChangeFlag</h3><p>This enum describes the changes that can occur to the properties
of the gesture object.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QPinchGesture.ScaleFactorChanged</tt></td>
<td class="topAlign"><tt>0x1</tt></td>
<td class="topAlign">The scale factor held by <a href="qpinchgesture.html#scaleFactor-prop">scaleFactor</a> changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPinchGesture.RotationAngleChanged</tt></td>
<td class="topAlign"><tt>0x2</tt></td>
<td class="topAlign">The rotation angle held by <a href="qpinchgesture.html#rotationAngle-prop">rotationAngle</a>
changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QPinchGesture.CenterPointChanged</tt></td>
<td class="topAlign"><tt>0x4</tt></td>
<td class="topAlign">The center point held by <a href="qpinchgesture.html#centerPoint-prop">centerPoint</a> changed.</td>
</tr>
</table>
<p>The ChangeFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;ChangeFlag&gt;. It stores an OR
combination of ChangeFlag values.</p>
<p><b>See also</b> <a href="qpinchgesture.html#changeFlags-prop">changeFlags</a> and <a href="qpinchgesture.html#totalChangeFlags-prop">totalChangeFlags</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QPinchGesture" />QPinchGesture.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><h3 class="fn"><a name="centerPoint" /><a href="qpointf.html">QPointF</a> QPinchGesture.centerPoint (<i>self</i>)</h3><h3 class="fn"><a name="changeFlags" /><a href="qpinchgesture-changeflags.html">ChangeFlags</a> QPinchGesture.changeFlags (<i>self</i>)</h3><h3 class="fn"><a name="lastCenterPoint" /><a href="qpointf.html">QPointF</a> QPinchGesture.lastCenterPoint (<i>self</i>)</h3><h3 class="fn"><a name="lastRotationAngle" />float QPinchGesture.lastRotationAngle (<i>self</i>)</h3><h3 class="fn"><a name="lastScaleFactor" />float QPinchGesture.lastScaleFactor (<i>self</i>)</h3><h3 class="fn"><a name="rotationAngle" />float QPinchGesture.rotationAngle (<i>self</i>)</h3><h3 class="fn"><a name="scaleFactor" />float QPinchGesture.scaleFactor (<i>self</i>)</h3><h3 class="fn"><a name="setCenterPoint" />QPinchGesture.setCenterPoint (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="setChangeFlags" />QPinchGesture.setChangeFlags (<i>self</i>, <a href="qpinchgesture-changeflags.html">ChangeFlags</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="setLastCenterPoint" />QPinchGesture.setLastCenterPoint (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="setLastRotationAngle" />QPinchGesture.setLastRotationAngle (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="setLastScaleFactor" />QPinchGesture.setLastScaleFactor (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="setRotationAngle" />QPinchGesture.setRotationAngle (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="setScaleFactor" />QPinchGesture.setScaleFactor (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="setStartCenterPoint" />QPinchGesture.setStartCenterPoint (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="setTotalChangeFlags" />QPinchGesture.setTotalChangeFlags (<i>self</i>, <a href="qpinchgesture-changeflags.html">ChangeFlags</a>&#160;<i>value</i>)</h3><h3 class="fn"><a name="setTotalRotationAngle" />QPinchGesture.setTotalRotationAngle (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="setTotalScaleFactor" />QPinchGesture.setTotalScaleFactor (<i>self</i>, float&#160;<i>value</i>)</h3><h3 class="fn"><a name="startCenterPoint" /><a href="qpointf.html">QPointF</a> QPinchGesture.startCenterPoint (<i>self</i>)</h3><h3 class="fn"><a name="totalChangeFlags" /><a href="qpinchgesture-changeflags.html">ChangeFlags</a> QPinchGesture.totalChangeFlags (<i>self</i>)</h3><h3 class="fn"><a name="totalRotationAngle" />float QPinchGesture.totalRotationAngle (<i>self</i>)</h3><h3 class="fn"><a name="totalScaleFactor" />float QPinchGesture.totalScaleFactor (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>